#ifndef TEST_GRAPHICS_RENDER_TEST_SUITE_H
#	define TEST_GRAPHICS_RENDER_TEST_SUITE_H

#include "test.h"

namespace dw {
	namespace system {

class Window;

	} // namespace system
	namespace graffiti {

class RenderWindow;

	} // graffiti
	namespace inputs {

class InputCommand;

	} // inputs
	namespace test {

class RenderTest;

	} // test
} // namespace dw

namespace dw {
	namespace test {

class RenderTestSuite
:	public dw::test::Test
{
public : //! @name Types definitions
	//! @{
	typedef dw::test::Test base;
	//! @}

public : //! @name Constants
	//! @{
	static const std::string Name;
	//! @}

public : //! @name Construction & Destruction
	//! @{
	RenderTestSuite(const std::string& name)
	:	base(name)
	,	m_stop(false) 
	{
		;
	}
	virtual ~RenderTestSuite()
	{
		dwAssert(m_tests.empty(), "Did you forget to call teardown ?");
	}
	//! @}

public : //! @name Commands
	//! @{
	template< class T >
	bool add()
	{
		T* newTest = new T();

		dwLogInform("RenderTestSuite %s::add( '%s' )\n", getName().c_str(), newTest->getName().c_str());
		
		m_tests.push_back(newTest);

		return true;
	}

	virtual bool setup();
	virtual bool run();
	virtual bool teardown();

	void stop() { m_stop = true; }
	//! @}

private : //! @name Types definitions
	//! @{
	class WindowListener;
	typedef std::vector< dw::test::RenderTest* > TestsCollection;
	//! @}

private : //! @name Data
	//! @{
	dw::system::Window* m_window;
	WindowListener* m_listener;
	dw::graffiti::RenderWindow* m_renderWindow;
	bool m_stop;

	TestsCollection m_tests;
	//! @}
};

	} // namespace test
} // namespace dw

#endif // !TEST_GRAPHICS_RENDER_TEST_SUITE_H
